package redis

// 键操作命令

func Del(key string) (int, error) {
	return insRedis.Int("DEL", key)
}

func Exists(key string) (int, error) {
	return insRedis.Int("EXISTS", key)
}

func Expire(key string, seconds int) (int, error) {
	return insRedis.Int("EXPIRE", key, seconds)
}

func ExpireAt(key string, timestamp int) (int, error) {
	return insRedis.Int("EXPIREAT", key, timestamp)
}

func Ttl(key string) (int, error) {
	return insRedis.Int("TTL", key)
}

func Persist(key string) (int, error) {
	return insRedis.Int("PERSIST", key)
}

func PExpire(key string, milliseconds int64) (int, error) {
	return insRedis.Int("PEXPIRE", key, milliseconds)
}

func PExpireAt(key string, timestamp int64) (int, error) {
	return insRedis.Int("PEXPIREAT", key, timestamp)
}

func PTtl(key string) (int64, error) {
	return insRedis.Int64("PTTL", key)
}
